//
//  DYLibraryConfig.m
//  DYEnergy
//
//  Created by Rdxer on 16/7/14.
//  Copyright © 2016年 firstcare. All rights reserved.
//

#import "DYLibraryConfig.h"

#import <Bugly/Bugly.h>

#import "DYAPI.h"

static id instance = nil;

@implementation DYLibraryConfig

+(instancetype)shared{
    if (instance) {
        return instance;
    }
    @synchronized (self) {
        if (instance == nil) {
            instance = [[self alloc]init];
        }
    }
    return instance;
}

-(void)becomeShared{
    instance = self;
}

-(instancetype)run{
    if (self.buglyAppId) {
        [Bugly startWithAppId:self.buglyAppId];
    }
    return self;
}

-(BOOL)isRelease{
#ifdef DEBUG
#warning DEBUG
    return NO;
#else
#warning NO DEBUG
    return YES;
#endif
}

@end
